<!DOCTYPE html>
<html>
    <head>
        {include file="common/meta" /}

        <!-- 在线网页编辑器引入 -->
        <link rel="stylesheet" href="/static/kindeditor/themes/default/default.css" />
        <script src="/static/kindeditor/kindeditor-all-min.js"></script>
        <script src="/static/kindeditor/lang/zh-CN.js"></script>
        <script>
        var editor;
        KindEditor.ready(function(K){
            editor = K.create('textarea[name="content"]', {
            allowFileManager : true
            });
        })
        </script>
    </head>

    <body class="form-wrap" >
        <div class="layui-container fly-marginTop">
            <div class="fly-panel" pad20 style="padding-top: 5px;">
                <div class="layui-form layui-form-pane">
                    <div class="layui-tab layui-tab-brief" lay-filter="user">
                        <ul class="layui-tab-title">
                            <li class="layui-this">添加商品</li>
                        </ul>

                        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                            <div class="layui-tab-item layui-show">
                                <form method="post" enctype="multipart/form-data">
                                    <!-- 商品标题 -->
                                    <div class="layui-row layui-col-space15 layui-form-item">
                                        <div class="layui-col-md3">
                                            <label class="layui-form-label">商品分类</label>
                                            <div class="layui-input-block"> 
                                                <select name="typeid">
                                                    <option value=""></option>
                                                </select>
                                            </div>
                                        </div>

                                        <!-- 商品名称 -->
                                        <div class="layui-col-md9">
                                            <label for="name" class="layui-form-label">商品名称</label>
                                            <div class="layui-input-block">
                                                <input type="text" id="name" name="name" required lay-verify="required" class="layui-input" placeholder="请输入商品名称" />
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 商品详情 -->
                                    <div class="layui-form-item layui-form-text">
                                        <div class="layui-input-block">
                                            <textarea id="content" name="content" placeholder="商品详情" class="layui-textarea" style="height: 260px;"></textarea>
                                        </div>
                                    </div>

                                    <!-- 商品价格 -->
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">商品价格</label>
                                            <div class="layui-input-inline" style="width: 190px;">
                                                <input type="text" name="price" id="price" required class="layui-input" placeholder="请输入商品价格" />
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 商品库存 -->
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">商品库存</label>
                                            <div class="layui-input-inline" style="width: 190px;">
                                                <input type="text" name="stock" id="stock" required class="layui-input" placeholder="请输入商品库存" />
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 附加功能 -->
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">附加功能</label>
                                            <div class="layui-input-inline" style="width: 190px;">
                                                <select name="state">
                                                    <option value="0">无须附加功能</option>
                                                    <option value=""></option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 上传多张商品图 -->
                                    <div class="layui-form-item">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">上传商品图片(可多张)</label>
                                            <div class="layui-input-inline" style="width: 190px;">
                                                <input type="file" name="imgs[]" multiple="multiple">
                                            </div>
                                        </div>
                                    </div>

                                    <!-- 提交 -->
                                    <div class="layui-form-item">
                                        <button class="layui-btn" type="submit">立即发布</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>
